angular.module('app').config(($stateProvider) => {

    $stateProvider.state('app.backdrop', {
        url         : '/backdrop',
        label       : 'Backdrop',
        controller  : 'app.backdrop',
        controllerAs: '$ctrl',
        templateUrl : 'view/app/backdrop/backdrop.html'
    });
}).controller('app.backdrop', function ($ionicBackdrop, $scope, $timeout) {
    var ctrl = this;
    ctrl.action = ()=> {
        $ionicBackdrop.retain();

        $timeout($ionicBackdrop.release, 5000);
    };

    $scope.$on('backdrop.hidden', ()=> {
        console.log('backdrop hide');
    });

    $scope.$on('backdrop.shown', ()=> {
        console.log('backdrop show');
    });
});